<!-- #include file="Config.asp" -->
<%

ip=Request.ServerVariables ("REMOTE_ADDR")
set rslogin=server.createobject("adodb.recordset")
sqllogin="select * from UserLoginRecord where id is null"
rslogin.open sqllogin,conn,1,3
rslogin.addnew
rslogin("time")=now()
rslogin("UserID")=session("AnyPIM_userID")
rslogin("ip")=ip
rslogin("LogType")="Logout"
rslogin("name")=session("AnyPIM_username")
rslogin("SERVER_SOFTWARE")=Request.ServerVariables ("SERVER_SOFTWARE")
rslogin("HTTP_USER_AGENT")=Request.ServerVariables ("HTTP_USER_AGENT")
rslogin.update
rslogin.close

session("AnyPIM_username")=""
session("AnyPIM_userID")=""
session("AnyPIM_RightVisit")=""
session("AnyPIM_RightAdd")=""
session("AnyPIM_RightEdit")=""
session("AnyPIM_RightDel")=""
session("AnyPIM_RightIncorporate")=""
session("AnyPIM_RightAdmin")=""

response.redirect "Userlogin.asp"
%>
